package com.tom.demo.controller.stockmarket;

import com.github.pagehelper.PageInfo;
import com.tom.demo.common.entity.StockMarket;
import com.tom.demo.service.stockmarket.StockMarketService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@Api(tags = {"分页测试"})
@RestController
@RequestMapping("stockMarket")
public class StockMarketController {

    @Resource
    private StockMarketService stockMarketService;

    @ApiOperation(value = "postgresql股市列表分页")
    @PostMapping("/pageList")
    public ResponseEntity<PageInfo<StockMarket>> pageList(@RequestParam(value = "page",defaultValue = "1")Integer page,
                                                          @RequestParam(value = "pageSize",defaultValue = "10")Integer pageSize) {
        return stockMarketService.pageList(page,pageSize);

    }
}
